package com.loser.module.user.entity;

import com.loser.module.LogicDel;
import com.loser.module.fill.MyFiledFill;
import io.github.loserya.module.fill.anno.FieldAutoFill;
import io.github.loserya.module.fill.hardcode.FieldFill;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.annotation.Collation;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 测试数据
 *
 * @author loser
 * @date 2023-02-05  13:56
 */

@Document("loser")
public class User extends LogicDel {
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getAge() {
        return age;
    }

    public void setAge(Long age) {
        this.age = age;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Id
    private String id;

    private String name;

    private Long age;

    @FieldAutoFill(type = FieldFill.INSERT_UPDATE, value = MyFiledFill.class)
    private String email;

    @Override
    public String toString() {
        return "User{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", email='" + email + '\'' +
                '}';
    }
}
